<html>
<head><meta charset="utf-8"><title>cross compilation and missing __rdl_alloc and friends · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cross.20compilation.20and.20missing.20__rdl_alloc.20and.20friends.html">cross compilation and missing __rdl_alloc and friends</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="215213649"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cross%20compilation%20and%20missing%20__rdl_alloc%20and%20friends/near/215213649" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ariadne Conill <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cross.20compilation.20and.20missing.20__rdl_alloc.20and.20friends.html#215213649">(Oct 31 2020 at 21:52)</a>:</h4>
<p>Hi!</p>
<p>I finally got around to making it possible to properly cross compile rust in Alpine (so it can be a first-class language there).  Unfortunately, I am having some problems finishing that work.  Namely, when crossing and building the stage1 rust, it fails to link due to missing <code>__rdl_alloc</code> and related symbols.  A terse build log is at <a href="https://tpaste.us/ejvV">https://tpaste.us/ejvV</a></p>
<p>Any help would be appreciated.  Thanks!</p>



<a name="215335905"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cross%20compilation%20and%20missing%20__rdl_alloc%20and%20friends/near/215335905" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ariadne Conill <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cross.20compilation.20and.20missing.20__rdl_alloc.20and.20friends.html#215335905">(Nov 02 2020 at 15:45)</a>:</h4>
<p>Hello,</p>
<p>Ping again regarding this issue.  We are stuck getting rust everywhere in Alpine until I can solve this <code>__rdl_alloc</code> issue.  I'm available all day to help debug...</p>



<a name="215345459"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cross%20compilation%20and%20missing%20__rdl_alloc%20and%20friends/near/215345459" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cross.20compilation.20and.20missing.20__rdl_alloc.20and.20friends.html#215345459">(Nov 02 2020 at 16:48)</a>:</h4>
<p><code>__rdl_alloc</code> should be defined at <a href="https://github.com/rust-lang/rust/blob/b218b952f800c1160b8b5e764ca651b02d678565/library/std/src/alloc.rs#L351">https://github.com/rust-lang/rust/blob/b218b952f800c1160b8b5e764ca651b02d678565/library/std/src/alloc.rs#L351</a></p>
<p>Can you run <code>readelf -s build/x86_64-alpine-linux-musl/stage1-std/x86_64-alpine-linux-musl/release/deps/std-*.o | grep __rdl_alloc</code>?</p>



<a name="215345480"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cross%20compilation%20and%20missing%20__rdl_alloc%20and%20friends/near/215345480" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cross.20compilation.20and.20missing.20__rdl_alloc.20and.20friends.html#215345480">(Nov 02 2020 at 16:49)</a>:</h4>
<p><span class="user-mention" data-user-id="360752">@Ariadne Conill</span> ^</p>



<a name="215345725"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cross%20compilation%20and%20missing%20__rdl_alloc%20and%20friends/near/215345725" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ariadne Conill <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cross.20compilation.20and.20missing.20__rdl_alloc.20and.20friends.html#215345725">(Nov 02 2020 at 16:50)</a>:</h4>
<p>yes.  give me a moment.</p>



<a name="215345787"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cross%20compilation%20and%20missing%20__rdl_alloc%20and%20friends/near/215345787" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ariadne Conill <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cross.20compilation.20and.20missing.20__rdl_alloc.20and.20friends.html#215345787">(Nov 02 2020 at 16:51)</a>:</h4>
<div class="codehilite"><pre><span></span><code>$ readelf -s build/x86_64-alpine-linux-musl/stage1-std/x86_64-alpine-linux-musl/release/deps/std-*.o | grep __rdl_alloc
     6: 0000000000000000     0 NOTYPE  GLOBAL HIDDEN   UND __rdl_alloc
     7: 0000000000000000     0 NOTYPE  GLOBAL HIDDEN   UND __rdl_alloc_zeroed
</code></pre></div>



<a name="215345948"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cross%20compilation%20and%20missing%20__rdl_alloc%20and%20friends/near/215345948" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cross.20compilation.20and.20missing.20__rdl_alloc.20and.20friends.html#215345948">(Nov 02 2020 at 16:52)</a>:</h4>
<p>Huh, that is only a reference and not a definition.</p>



<a name="215346062"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cross%20compilation%20and%20missing%20__rdl_alloc%20and%20friends/near/215346062" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ariadne Conill <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cross.20compilation.20and.20missing.20__rdl_alloc.20and.20friends.html#215346062">(Nov 02 2020 at 16:53)</a>:</h4>
<p>yes, which is why i'm baffled, because i agree it should be there per <a href="http://alloc.rs">alloc.rs</a> defining it</p>



<a name="215346322"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cross%20compilation%20and%20missing%20__rdl_alloc%20and%20friends/near/215346322" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cross.20compilation.20and.20missing.20__rdl_alloc.20and.20friends.html#215346322">(Nov 02 2020 at 16:54)</a>:</h4>
<p>I see you are defining your own triple x86_64-alpine-linux-musl. How does it differ from x86_64-unknown-linux-musl?</p>



<a name="215346448"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cross%20compilation%20and%20missing%20__rdl_alloc%20and%20friends/near/215346448" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ariadne Conill <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cross.20compilation.20and.20missing.20__rdl_alloc.20and.20friends.html#215346448">(Nov 02 2020 at 16:55)</a>:</h4>
<div class="codehilite"><pre><span></span><code>use crate::spec::TargetResult;

pub fn target() -&gt; TargetResult {
    let mut base = super::x86_64_unknown_linux_musl::target()?;

    base.llvm_target = &quot;x86_64-alpine-linux-musl&quot;.to_string();
    base.target_vendor = &quot;alpine&quot;.to_string();
    base.options.crt_static_default = false;
    base.options.static_position_independent_executables = true;
    base.options.need_rpath = true;

    Ok(base)
}
</code></pre></div>



<a name="215346887"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cross%20compilation%20and%20missing%20__rdl_alloc%20and%20friends/near/215346887" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ariadne Conill <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cross.20compilation.20and.20missing.20__rdl_alloc.20and.20friends.html#215346887">(Nov 02 2020 at 16:59)</a>:</h4>
<p>in other words, no difference other than static linking being disabled :)</p>



<a name="215347353"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cross%20compilation%20and%20missing%20__rdl_alloc%20and%20friends/near/215347353" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cross.20compilation.20and.20missing.20__rdl_alloc.20and.20friends.html#215347353">(Nov 02 2020 at 17:02)</a>:</h4>
<p>I don't have a clue what could be the problem. Maybe it will work if you delete <code>build/x86_64-alpine-linux-musl/stage1-std</code>?</p>



<a name="215348936"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cross%20compilation%20and%20missing%20__rdl_alloc%20and%20friends/near/215348936" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ariadne Conill <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cross.20compilation.20and.20missing.20__rdl_alloc.20and.20friends.html#215348936">(Nov 02 2020 at 17:12)</a>:</h4>
<p>i think it would just rebuild, right?</p>



<a name="215349002"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cross%20compilation%20and%20missing%20__rdl_alloc%20and%20friends/near/215349002" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cross.20compilation.20and.20missing.20__rdl_alloc.20and.20friends.html#215349002">(Nov 02 2020 at 17:13)</a>:</h4>
<p>Yes, maybe it is just a glitch.</p>



<a name="215349446"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cross%20compilation%20and%20missing%20__rdl_alloc%20and%20friends/near/215349446" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ariadne Conill <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cross.20compilation.20and.20missing.20__rdl_alloc.20and.20friends.html#215349446">(Nov 02 2020 at 17:16)</a>:</h4>
<p>the problem is that its reproducible... i'm not sure how i could hack that into the build process</p>



<a name="215350790"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cross%20compilation%20and%20missing%20__rdl_alloc%20and%20friends/near/215350790" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ariadne Conill <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cross.20compilation.20and.20missing.20__rdl_alloc.20and.20friends.html#215350790">(Nov 02 2020 at 17:26)</a>:</h4>
<p>however, its moot because deleting it doesn't solve it</p>



<a name="215355685"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cross%20compilation%20and%20missing%20__rdl_alloc%20and%20friends/near/215355685" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ariadne Conill <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cross.20compilation.20and.20missing.20__rdl_alloc.20and.20friends.html#215355685">(Nov 02 2020 at 18:02)</a>:</h4>
<p>is there a way to get more verbose output out of the rust build process?  like "compiling <a href="http://alloc.rs">alloc.rs</a>" for example</p>



<a name="215355753"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cross%20compilation%20and%20missing%20__rdl_alloc%20and%20friends/near/215355753" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cross.20compilation.20and.20missing.20__rdl_alloc.20and.20friends.html#215355753">(Nov 02 2020 at 18:03)</a>:</h4>
<p><span class="user-mention" data-user-id="360752">@Ariadne Conill</span> <code>x.py build -v</code></p>



<a name="215355768"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cross%20compilation%20and%20missing%20__rdl_alloc%20and%20friends/near/215355768" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cross.20compilation.20and.20missing.20__rdl_alloc.20and.20friends.html#215355768">(Nov 02 2020 at 18:03)</a>:</h4>
<p>or <code>-vv</code> if that's not enough</p>



<a name="215355988"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cross%20compilation%20and%20missing%20__rdl_alloc%20and%20friends/near/215355988" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ariadne Conill <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cross.20compilation.20and.20missing.20__rdl_alloc.20and.20friends.html#215355988">(Nov 02 2020 at 18:04)</a>:</h4>
<p>ok let me see if i can gather a full build log with -vv, maybe it will give us some enlightenment</p>



<a name="215356080"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cross%20compilation%20and%20missing%20__rdl_alloc%20and%20friends/near/215356080" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cross.20compilation.20and.20missing.20__rdl_alloc.20and.20friends.html#215356080">(Nov 02 2020 at 18:05)</a>:</h4>
<p>note that -vv is <em>really</em> verbose so I'd try -v first</p>



<a name="215356356"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cross%20compilation%20and%20missing%20__rdl_alloc%20and%20friends/near/215356356" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ariadne Conill <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cross.20compilation.20and.20missing.20__rdl_alloc.20and.20friends.html#215356356">(Nov 02 2020 at 18:07)</a>:</h4>
<p>-vv seems to be the level of verbosity i am used to from C world :)</p>



<a name="215356665"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cross%20compilation%20and%20missing%20__rdl_alloc%20and%20friends/near/215356665" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cross.20compilation.20and.20missing.20__rdl_alloc.20and.20friends.html#215356665">(Nov 02 2020 at 18:10)</a>:</h4>
<p><code>x.py --help</code> also documents a lot of these flags</p>



<a name="215356683"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cross%20compilation%20and%20missing%20__rdl_alloc%20and%20friends/near/215356683" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cross.20compilation.20and.20missing.20__rdl_alloc.20and.20friends.html#215356683">(Nov 02 2020 at 18:10)</a>:</h4>
<p>and <code>config.toml.example</code></p>



<a name="215363179"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cross%20compilation%20and%20missing%20__rdl_alloc%20and%20friends/near/215363179" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ariadne Conill <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cross.20compilation.20and.20missing.20__rdl_alloc.20and.20friends.html#215363179">(Nov 02 2020 at 19:04)</a>:</h4>
<p>full build log at <a href="https://distfiles.dereferenced.org/rust-cross-s390x-log.txt">https://distfiles.dereferenced.org/rust-cross-s390x-log.txt</a></p>



<a name="215363584"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cross%20compilation%20and%20missing%20__rdl_alloc%20and%20friends/near/215363584" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ariadne Conill <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cross.20compilation.20and.20missing.20__rdl_alloc.20and.20friends.html#215363584">(Nov 02 2020 at 19:07)</a>:</h4>
<p>so, there is "alloc=/home/kaniini/aports/community/rust/src/rustc-1.47.0-src/build/x86_64-alpine-linux-musl/stage1-std/x86_64-alpine-linux-musl/release/deps/liballoc-6f33e873ffca5c66.rlib" referenced in the link phase for std</p>



<a name="215363925"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cross%20compilation%20and%20missing%20__rdl_alloc%20and%20friends/near/215363925" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ariadne Conill <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cross.20compilation.20and.20missing.20__rdl_alloc.20and.20friends.html#215363925">(Nov 02 2020 at 19:09)</a>:</h4>
<p>running <code>nm</code> on that rlib does not show any symbols though</p>



<a name="215364408"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cross%20compilation%20and%20missing%20__rdl_alloc%20and%20friends/near/215364408" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ariadne Conill <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cross.20compilation.20and.20missing.20__rdl_alloc.20and.20friends.html#215364408">(Nov 02 2020 at 19:13)</a>:</h4>
<p>so, <code>__default_lib_allocator</code> is guarded by <code>#[unstable(feature = "alloc_internals", issue = "none")]</code>.  i wonder if this evaluates as false.  is there some way to see?</p>



<a name="215364441"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cross%20compilation%20and%20missing%20__rdl_alloc%20and%20friends/near/215364441" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cross.20compilation.20and.20missing.20__rdl_alloc.20and.20friends.html#215364441">(Nov 02 2020 at 19:13)</a>:</h4>
<p>that's not a cfg, that's a stability attribute</p>



<a name="215364513"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cross%20compilation%20and%20missing%20__rdl_alloc%20and%20friends/near/215364513" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cross.20compilation.20and.20missing.20__rdl_alloc.20and.20friends.html#215364513">(Nov 02 2020 at 19:14)</a>:</h4>
<p><a href="https://doc.rust-lang.org/unstable-book/language-features/staged-api.html">https://doc.rust-lang.org/unstable-book/language-features/staged-api.html</a></p>



<a name="215364565"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cross%20compilation%20and%20missing%20__rdl_alloc%20and%20friends/near/215364565" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ariadne Conill <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cross.20compilation.20and.20missing.20__rdl_alloc.20and.20friends.html#215364565">(Nov 02 2020 at 19:14)</a>:</h4>
<p>okay.  i'm just trying to figure out why __rdl_alloc does not appear in that rlib.  it should appear somehow.</p>



<a name="215364570"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cross%20compilation%20and%20missing%20__rdl_alloc%20and%20friends/near/215364570" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cross.20compilation.20and.20missing.20__rdl_alloc.20and.20friends.html#215364570">(Nov 02 2020 at 19:14)</a>:</h4>
<p>so it doesn't evaluate one way or another, that function is always compiled</p>



<a name="215364925"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cross%20compilation%20and%20missing%20__rdl_alloc%20and%20friends/near/215364925" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ariadne Conill <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cross.20compilation.20and.20missing.20__rdl_alloc.20and.20friends.html#215364925">(Nov 02 2020 at 19:17)</a>:</h4>
<p>does anybody have any theories as to why <code>__rdl_alloc</code> would not appear in that rlib?</p>



<a name="215365201"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cross%20compilation%20and%20missing%20__rdl_alloc%20and%20friends/near/215365201" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ariadne Conill <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cross.20compilation.20and.20missing.20__rdl_alloc.20and.20friends.html#215365201">(Nov 02 2020 at 19:19)</a>:</h4>
<p>ok, it appears in my stage0-std, <code>__rdl_alloc</code> appears in the libstd rlib not the liballoc rlib</p>



<a name="215365206"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cross%20compilation%20and%20missing%20__rdl_alloc%20and%20friends/near/215365206" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ariadne Conill <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cross.20compilation.20and.20missing.20__rdl_alloc.20and.20friends.html#215365206">(Nov 02 2020 at 19:19)</a>:</h4>
<p>lets see about stage1</p>



<a name="215365376"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cross%20compilation%20and%20missing%20__rdl_alloc%20and%20friends/near/215365376" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ariadne Conill <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cross.20compilation.20and.20missing.20__rdl_alloc.20and.20friends.html#215365376">(Nov 02 2020 at 19:20)</a>:</h4>
<p>yeah, __rdl_alloc nowhere to be found in stage1.</p>



<a name="215365565"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cross%20compilation%20and%20missing%20__rdl_alloc%20and%20friends/near/215365565" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ariadne Conill <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cross.20compilation.20and.20missing.20__rdl_alloc.20and.20friends.html#215365565">(Nov 02 2020 at 19:21)</a>:</h4>
<p>to confirm, <code>#[cfg(not(test))]</code> means that expression will not be compiled, right?</p>



<a name="215365653"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cross%20compilation%20and%20missing%20__rdl_alloc%20and%20friends/near/215365653" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ariadne Conill <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cross.20compilation.20and.20missing.20__rdl_alloc.20and.20friends.html#215365653">(Nov 02 2020 at 19:22)</a>:</h4>
<p>(unless test is false)</p>



<a name="215365858"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cross%20compilation%20and%20missing%20__rdl_alloc%20and%20friends/near/215365858" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cross.20compilation.20and.20missing.20__rdl_alloc.20and.20friends.html#215365858">(Nov 02 2020 at 19:23)</a>:</h4>
<p>it means it <em>will</em> be compiled unless you run <code>x.py test</code></p>



<a name="215366065"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cross%20compilation%20and%20missing%20__rdl_alloc%20and%20friends/near/215366065" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ariadne Conill <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cross.20compilation.20and.20missing.20__rdl_alloc.20and.20friends.html#215366065">(Nov 02 2020 at 19:25)</a>:</h4>
<p>yes, what i am wondering is if the buildsystem is slipping in <code>test</code> as a cfg variable</p>



<a name="215366310"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cross%20compilation%20and%20missing%20__rdl_alloc%20and%20friends/near/215366310" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cross.20compilation.20and.20missing.20__rdl_alloc.20and.20friends.html#215366310">(Nov 02 2020 at 19:27)</a>:</h4>
<p>it shouldn't be, but if it were it would show up as <code>--cfg test</code> somehwere in the logs</p>



<a name="215366558"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cross%20compilation%20and%20missing%20__rdl_alloc%20and%20friends/near/215366558" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cross.20compilation.20and.20missing.20__rdl_alloc.20and.20friends.html#215366558">(Nov 02 2020 at 19:29)</a>:</h4>
<p>--cfg test is automatically set when compiling for tests, but not otherwise.</p>



<a name="215366772"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cross%20compilation%20and%20missing%20__rdl_alloc%20and%20friends/near/215366772" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ariadne Conill <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cross.20compilation.20and.20missing.20__rdl_alloc.20and.20friends.html#215366772">(Nov 02 2020 at 19:30)</a>:</h4>
<p>this is truly mindboggling</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>